---
title: Exception thrown: 'Class \'Memcached\' not found'
author: notabug.org/aab
time: Sat, 15 Feb 2020 13:24:55 UTC
status: open
---

author: notabug.org
time: Sat, 15 Feb 2020 13:24:55 UTC
content: -----
Trying to get memcached plugin to work, with memcached and php-memcached installed, throws this error (non stop) as soon as it is activated: ServerErrorAction: 500 Class 'Memcached' not found #0 /var/www/gnusocial/plugins/Memcached/MemcachedPlugin.php(97): MemcachedPlugin->_ensureConn() #1 /var/www/gnusocial/lib/util/event.php(89): MemcachedPlugin->onStartCacheGet('gnusocial:gnuso...', false) #2 /var/www/gnusocial/lib/cache/cache.php(177): Event::handle('StartCacheGet', Array) #3 /var/www/gnusocial/classes/Config.php(70): Cache->get('gnusocial:gnuso...') #4 /var/www/gnusocial/classes/Config.php(56): Config::_getSettings() #5 /var/www/gnusocial/lib/util/gnusocial.php(203): Config::loadSettings() #6 /var/www/gnusocial/lib/util/common.php(30): GNUsocial::init(NULL, NULL, NULL) #7 /var/www/gnusocial/public/index.php(171): require_once('/var/www/gnusoc...') #8 {main}
-----

author: notabug.org
time: Sun, 01 Mar 2020 23:59:03 UTC
content: -----
Can't reproduce. Make sure `php -m` lists memcached, it seems like it's not correctly installed. If you'd like to try, my fork has a docker file with the extension added. To run it use `docker-compose up`. To enable the plugin use the server `172.22.0.4`, which refers to the host, making sure memcached is running there.
-----

author: notabug.org
time: Mon, 02 Mar 2020 09:46:00 UTC
content: -----
Ok, i'm listing the steps, just in case i've missed something: - apt install memcached php-memcached - lsof -i:11211 gives "memcached 27853 memcache 26u IPv4 1508051 0t0 TCP localhost:11211 (LISTEN)" - php -m | grep memcached > memcached - added memcached config to GS config.php as it is on README plugin. - As soon as config.php is saved, the error starts.
-----
